package com.iscas.dataaggregation.strategy;

import java.util.Map;

public class DefaultChaosStrategy implements ChaosFaultTypeStrategy {

    @Override
    public String getFaultType(Map<String, Object> data) {
        String chaosType = (String) data.get("chaosType");
        Map<String, Object> chaosData = (Map<String, Object>) data.get(chaosType);

        // 获取 action 字段
        String action = (String) chaosData.get("action");
        return chaosType + " " + action;
    }
}
